from django.db import models
import time
# Create your models here.
# 创建一个模型
class Person(models.Model):
    user_name = models.CharField(max_length=50)
    # last_name = models.CharField(max_length=50)
    email = models.EmailField(max_length=100, unique=True) #unique=True 唯一值
    age = models.IntegerField()
    created_at = models.BigIntegerField(default=int(time.time()), blank=True)
    # created_at = models.DateTimeField(auto_now_add=True)


    def __str__(self):
        return f"{self.user_name}"
        # return f"{self.first_name} {self.last_name}"